import { getEchoTextByTrueOrFalse } from '@/utils/bizUtils';
export const tableColumns = [
  {
    title: '供应商编码',
    key: 'supplyUuid',
  },
  {
    title: '供应商名称',
    render: (h, { row }) => {
      return (
        <span>{ row.supplyInfoDTO?.supplyName }</span>
      )
    }
  },
  {
    title: '供应商管理区域',
    render: (h, { row }) => {
      return (
        <span>{ row.supplyInfoDTO?.supplyManagerArea }</span>
      )
    }
  },
  {
    title: '是否敏感',
    render: (h, { row }) => {
      return getEchoTextByTrueOrFalse({ h, val: row.supplyProductInfo?.isPriceSensitive });
    }
  },
  {
    title: '商品管理区域',
    render: (h, { row }) => {
      return (
        <span>{ row.supplyProductInfo?.manageArea }</span>
      )
    }
  },
  {
    title: '供货单位',
    render: (h, { row }) => {
      return (
        <span>{ row.supplyProductInfo?.supplyGoodsUnit }</span>
      )
    }
  },
  {
    title: 'SKU编码',
    key: 'skuNo',
  },
  {
    title: '商品名称',
    render: (h, { row }) => {
      return (
        <span>{ row.supplyProductInfo?.productName }</span>
      )
    }
  },
  {
    title: '规格',
    render: (h, { row }) => {
      return (
        <span>{ row.supplyProductInfo?.specDetailStr }</span>
      )
    }
  },
  {
    title: '厂商代码',
    key: 'factoryCode',
  },
  {
    title: '厂商名称',
    key: 'factoryName',
  },
  {
    title: '最小订货量',
    key: 'minOrderGoodsNum',
  },
  {
    title: '是否保修',
    render: (h, { row }) => {
      return getEchoTextByTrueOrFalse({ h, val: row.warrantyStatus });
    }
  },
  {
    title: '保修天数',
    key: 'warrantyDay',
  },
  {
    title: '是否可换货',
    render: (h, { row }) => {
      return getEchoTextByTrueOrFalse({ h, val: row.exchangeGoodsStatus });
    }
  },
  {
    title: '换货天数',
    key: 'exchangeGoodsDay',
  },
  {
    title: '换货条件',
    key: 'exchangeGoodsCondition',
  },
  {
    title: '是否可退货',
    render: (h, { row }) => {
      return getEchoTextByTrueOrFalse({ h, val: row.returnGoodsStatus });
    }
  },
  {
    title: '退货天数',
    key: 'returnGoodsDay',
  },
  {
    title: '退货条件',
    key: 'returnGoodsCondition',
  },
  {
    title: '最小退换货量',
    key: 'minReOrExNum',
  },
  {
    title: '商品销售最小残次品',
    key: 'minSaleImperfectionsNum',
  },
  {
    title: '商品包装',
    key: 'productPacking',
  },
  {
    title: '其他服务承诺',
    key: 'otherPromise',
  },
]
